<%

response.addHeader "Pragma", "no-cache"
response.addHeader "Cache-Control", "must-revalidate"
response.addHeader "Cache-Control", "no-cache"
response.addHeader "Cache-Control", "no-store"
Response.AddHeader "Expires", 0



set con = Server.CreateObject ("ADODB.connection")
Con.Open Application("ConDB")

'sql="SELECT ID_TRIPLETTA, APPLICATIVO, CATEGORIA, PROBLEMA, TIPOLOGIA, STATO, PRIORITA FROM TRIPLETTE where stato=1 order by applicativo "
'sql="SELECT DISTINCT APPLICATIVO FROM         dbo.TRIPLETTE"
sql = request("query")
set rs = con.Execute(sql)

'Response.Write rs.State
'Response.end

if (rs.State = 1) then
	if (not rs.eof) then

		Response.Write rs(0)

	else

		Response.Write 0

	end if
end if
%>
                    


